
package vn.aptech.project.control;
import vn.aptech.project.model.dao.*;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.sql.SQLException;
import vn.aptech.project.model.dto.*;
import java.util.Vector;

public class  tblorder_BLL {

private tblorder_DAO   obj ;

public tblorder_BLL() throws ClassNotFoundException, SQLException, IOException {
     this.obj   = new  tblorder_DAO();
}
public int getOrderidByCusid(int CustomerId) throws SQLException, FileNotFoundException, IOException{
return obj.getOrderidByCusid(CustomerId);
}
public Vector selecttblorder1() throws SQLException, ClassNotFoundException, IOException{
    return obj.selectall1();
}
public Vector totalorder() throws SQLException
{
return obj.totalorder();
}
public Vector toporder() throws SQLException
{
return obj.toporder();
}
public Vector topcustomer() throws SQLException
{
return obj.topcustomer();
}
public Vector SearchByCustomerName1(String cust_name) throws SQLException, ClassNotFoundException, FileNotFoundException, IOException{
    return obj.SearchByCustomerName1(cust_name);
}
public Vector SearchByProductName1(String productname) throws SQLException, ClassNotFoundException, IOException{
    return obj.SearchByProductName1(productname);
}
public Vector SearchByOrderId1(int orderid) throws SQLException, ClassNotFoundException, FileNotFoundException, IOException{
    return obj.SearchByOrderId1(orderid);
}
public Vector SearchByOrderIdAndCustName1(int orderid,String cust_name) throws SQLException, ClassNotFoundException, IOException{
    return obj.SearchByOrderIdAndCustName1(orderid, cust_name);
}
public Vector SearchByEmpName(String staffname) throws SQLException{
    return obj.SearchByEmpName(staffname);
}
public Vector selecttblorder() throws SQLException {
 return  obj.selectall();
}
public int getCustomerIdByOrderid(int orderid) throws SQLException, FileNotFoundException, IOException {
 return  obj.getCustomerIdByOrderid(orderid);
}
public Vector SearchByCustomerName(String cust_name) throws SQLException {
 return  obj.SearchByCustomerName(cust_name);
}
public Vector SearchByProductName(String productname) throws SQLException {
 return  obj.SearchByProductName(productname);
}
public Vector SearchByOrderId(int orderid) throws SQLException {
 return  obj.SearchByOrderId(orderid);
}
public Vector SearchByOrderIdAndCustName(int orderid,String cust_name) throws SQLException {
 return  obj.SearchByOrderIdAndCustName(orderid, cust_name);
}

public int inserttblorder(tblorder_DTO object) throws SQLException {
 return  obj.insert(object);
}


public int updatettblorder(tblorder_DTO object) throws SQLException {
 return  obj.update(object);
}


public int deletettblorder(int orderid) throws SQLException {
 return  obj.delete(orderid);
}
}
